import { Annotation } from "@fimagine/annotation";
import { IGlobalLoggerConfig, ILoggerCreator, ILoggerOpts, IWrappedFunc } from "../common/interface";

export interface ILogger extends Annotation.IFunc, Annotation.IProp, Annotation.ICls, ILoggerOpts<ILogger> {
  Wrap<F extends (...args: any[]) => any>(whoami: string, func: F): IWrappedFunc<F>;
  Wrap<F extends (...args: any[]) => any>(func: F): (...args: Parameters<F>) => ReturnType<F>;
  Clone(opts?: Partial<ILoggerOpts<ILogger>>): ILogger;
  print(whoami: string, ...args: any[]): void;
}
export type TLoggerCreator = ILoggerCreator<ILogger>
export type TLoggerOpts = ILoggerOpts<ILogger>
export type TGlobalConfig = IGlobalLoggerConfig<ILogger>
